<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const bc = new BroadcastChannel("test_channel");
      bc.onmessage = (event) => {
        console.log("Received, ", event.data, event);
      };
      bc.postMessage("Hello " + Math.random());
    </script>
  </body>
</html>
